import wx

class LineGraph(wx.Frame):
    def __init__(self, parent=None, id=-1, title=None):
        wx.Frame.__init__(self, parent, id, title)
        self.panel = wx.Panel(self, size=(640, 480))
        self.panel.Bind(wx.EVT_PAINT, self.on_paint)
        self.Fit()
 
    def on_paint(self, event):
        dc = wx.PaintDC(self.panel)
        # draw the boarders of the Graph
        # set the size of the color of the pen and the size
        dc.SetPen(wx.Pen('gray', 2))
        # draw the verticle line for the bar graph
        dc.DrawLine(40, 40, 40, 420)
        # draw the horizontal line for the bar graph
        dc.DrawLine(40, 420, 620, 420)
        # set pen to a smaller size
        dc.SetPen(wx.Pen('black', 1))
        # draw the horizontal tick marks on the graph
        dc.DrawLine(60, 410, 60, 420)
        dc.DrawLine(80, 410, 80, 420)
        dc.DrawLine(100, 410, 100, 420)
        dc.DrawLine(120, 410, 120, 420)
        dc.DrawLine(140, 410, 140, 420)
        dc.DrawLine(160, 410, 160, 420)
        dc.DrawLine(180, 410, 180, 420)
        dc.DrawLine(200, 410, 200, 420)
        dc.DrawLine(220, 410, 220, 420)
        dc.DrawLine(240, 410, 240, 420)
        dc.DrawLine(260, 410, 260, 420)
        dc.DrawLine(280, 410, 280, 420)
        dc.DrawLine(300, 410, 300, 420)
        dc.DrawLine(320, 410, 320, 420)
        dc.DrawLine(340, 410, 340, 420)
        dc.DrawLine(360, 410, 360, 420)
        dc.DrawLine(380, 410, 380, 420)
        dc.DrawLine(400, 410, 400, 420)
        dc.DrawLine(420, 410, 420, 420)
        dc.DrawLine(440, 410, 440, 420)
        dc.DrawLine(460, 410, 460, 420)
        dc.DrawLine(480, 410, 480, 420)
        dc.DrawLine(500, 410, 500, 420)
        dc.DrawLine(520, 410, 520, 420)
        dc.DrawLine(540, 410, 540, 420)
        dc.DrawLine(560, 410, 560, 420)
        dc.DrawLine(580, 410, 580, 420)
        dc.DrawLine(600, 410, 600, 420)
        # draw the vertical tick marks on the graph
        dc.DrawLine(40, 400, 50, 400)
        dc.DrawLine(40, 380, 50, 380)
        dc.DrawLine(40, 360, 50, 360)
        dc.DrawLine(40, 340, 50, 340)
        dc.DrawLine(40, 320, 50, 320)
        dc.DrawLine(40, 300, 50, 300)
        dc.DrawLine(40, 280, 50, 280)
        dc.DrawLine(40, 260, 50, 260)
        dc.DrawLine(40, 240, 50, 240)
        dc.DrawLine(40, 220, 50, 220)
        dc.DrawLine(40, 200, 50, 200)
        dc.DrawLine(40, 180, 50, 180)
        dc.DrawLine(40, 160, 50, 160)
        dc.DrawLine(40, 140, 50, 140)
        dc.DrawLine(40, 120, 50, 120)
        dc.DrawLine(40, 100, 50, 100)
        dc.DrawLine(40, 80, 50, 80)
        dc.DrawLine(40, 60, 50, 60)
        
        # draw and example graph
        # set pen color and size
        dc.SetPen(wx.Pen('red', 1))
        # draw a line then a circle for each point on the bar graph
        dc.DrawLine(40, 420, 60, 400)
        dc.DrawCircle(60, 400, 2)
        #
        dc.DrawLine(60, 400, 80, 200)
        dc.DrawCircle(80, 200, 2)
        #
        dc.DrawLine(80, 200, 100, 300)
        dc.DrawCircle(100, 300, 2)
        #
        dc.DrawLine(100, 300, 120, 300)
        dc.DrawCircle(120, 300, 2)
        
        
        #rect = wx.Rect(50, 50, 100, 100)
        #dc.DrawRoundedRectangleRect(rect, 8)
        #dc.SetBrush(wx.Brush('yellow'))
        #x = 250
        #y = 100
        #r = 50
        #dc.DrawCircle(x, y, r)
 

#------------------------------------------------------------------------------
app = wx.PySimpleApp()
frame1 = LineGraph(title='Graph')
frame1.Center()
frame1.Show()
app.MainLoop()